package com.example.ssm.controller;

import com.example.ssm.pojo.basicinfo.query.MessageModel_BasicQuery;
import com.example.ssm.pojo.basicinfo.query.RequestModel_BasicQuery;
import com.example.ssm.service.BasicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Package: com.example.ssm.controller
 * @ClassName: BasicController
 * @Author: 76470
 * @CreateTime: 2021/6/10 16:58
 * @Description:
 */
@CrossOrigin
@RestController
public class BasicController {
	@Autowired
	private BasicService basicService;
	@RequestMapping(value = "/basic/query", method = { RequestMethod.POST,RequestMethod.GET})
	public MessageModel_BasicQuery BasicQueryController(@RequestBody RequestModel_BasicQuery requestModel_basicQuery ){
		System.out.println ("当前进行服务为：分页查询（BasicQuery）");//test
		System.out.println ("Controller接收到pageSize:"+requestModel_basicQuery.getPageSize ()+", pageNum:"+requestModel_basicQuery.getPageNum ()+", name:"+requestModel_basicQuery.getName ()+", category:"+requestModel_basicQuery.getCategory ());//test
		return basicService.BasicQueryService ( requestModel_basicQuery.getPageSize (),
				requestModel_basicQuery.getPageNum (),requestModel_basicQuery.getName (),requestModel_basicQuery.getCategory () );
	}
	
}
